import Vue from 'vue'
import App from './App'
import store from './store'
import Util from './common/js/util.js'
import Http from './common/js/http.js'
import * as request from './common/js/request'
import sdk from '@/common/js/sdkMethods.js'
// 引入自定义方法
import Gogal from '@/plugin/app.js'
import Lang from './common/js/lang.js'
import Config from './common/js/config.js'
// 注册全局头部组件
import cuCustom from '@/common/colorui/components/cu-custom.vue'

import BottomPopup from '@/common/components/global/bottom-popup.vue'
import AvatarName from '@/common/components/global/avatar-name.vue'
// 全局页面容器
import pageContainer from '@/common/components/global/page-container.vue'
Vue.prototype.$store = store // 挂在vue

Vue.config.productionTip = false

Vue.prototype.$sdk = sdk
Vue.prototype.$util = Util
Vue.prototype.$api = Http
Vue.prototype.$request = request
Vue.prototype.$langConfig = Lang // 语言包对象
Vue.prototype.$lang = Lang.lang // 解析语言包

Vue.prototype.$config = Config

App.mpType = 'app'

Vue.use(Gogal)

Vue.component('avatar-name', AvatarName)

Vue.component('page-container', pageContainer)
Vue.component('cu-custom', cuCustom)
Vue.component('bottom-popup', BottomPopup)
// 常用组件
import loadingCover from '@/components/loading-cover/loading-cover.vue'
Vue.component('loading-cover', loadingCover)

import nsEmpty from '@/components/ns-empty/ns-empty.vue'
Vue.component('ns-empty', nsEmpty)

import MescrollUni from '@/components/mescroll/my-list-mescroll.vue'
import Mescroll from '@/common/components/mescroll-uni/mescroll-uni.vue'
import MenuTabs from '@/common/components/menu-tabs/menu-tabs.vue'
Vue.component('menu-tabs', MenuTabs)
Vue.component('mescroll-uni', MescrollUni) // 上拉加载,下拉刷新组件
Vue.component('mescroll', Mescroll) // 上拉加载,下拉刷新组件

import MescrollBody from '@/components/mescroll/mescroll-body.vue'
Vue.component('mescroll-body', MescrollBody)

import NsLogin from '@/components/ns-login/ns-login.vue'
console.log('部署 #build10')
Vue.component('ns-login', NsLogin)
// #ifdef H5
import Vconsole from 'vconsole'

if (process.env.NODE_ENV == 'development') {
	const vConsole = new Vconsole()
} else {
	Util.eliminateLogAll()
}

// #endif
const app = new Vue({
	...App,
	store
})

app.$mount()
